package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BasicMessageTypeMapper;
import com.ruoyi.system.domain.BasicMessageType;
import com.ruoyi.system.service.IBasicMessageTypeService;

/**
 * 消息类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class BasicMessageTypeServiceImpl implements IBasicMessageTypeService 
{
    @Autowired
    private BasicMessageTypeMapper basicMessageTypeMapper;

    /**
     * 查询消息类型
     * 
     * @param messageTypeId 消息类型主键
     * @return 消息类型
     */
    @Override
    public BasicMessageType selectBasicMessageTypeByMessageTypeId(Long messageTypeId)
    {
        return basicMessageTypeMapper.selectBasicMessageTypeByMessageTypeId(messageTypeId);
    }

    /**
     * 查询消息类型列表
     * 
     * @param basicMessageType 消息类型
     * @return 消息类型
     */
    @Override
    public List<BasicMessageType> selectBasicMessageTypeList(BasicMessageType basicMessageType)
    {
        return basicMessageTypeMapper.selectBasicMessageTypeList(basicMessageType);
    }

    /**
     * 新增消息类型
     * 
     * @param basicMessageType 消息类型
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertBasicMessageType(BasicMessageType basicMessageType)
    {
        return basicMessageTypeMapper.insertBasicMessageType(basicMessageType);
    }

    /**
     * 修改消息类型
     * 
     * @param basicMessageType 消息类型
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateBasicMessageType(BasicMessageType basicMessageType)
    {
        return basicMessageTypeMapper.updateBasicMessageType(basicMessageType);
    }

    /**
     * 批量删除消息类型
     * 
     * @param messageTypeIds 需要删除的消息类型主键
     * @return 结果
     */
    @Override
    public int deleteBasicMessageTypeByMessageTypeIds(Long[] messageTypeIds)
    {
        return basicMessageTypeMapper.deleteBasicMessageTypeByMessageTypeIds(messageTypeIds);
    }

    /**
     * 删除消息类型信息
     * 
     * @param messageTypeId 消息类型主键
     * @return 结果
     */
    @Override
    public int deleteBasicMessageTypeByMessageTypeId(Long messageTypeId)
    {
        return basicMessageTypeMapper.deleteBasicMessageTypeByMessageTypeId(messageTypeId);
    }
}
